import os

files = os.listdir('icons')

os.chdir('icons')
print(os.getcwd())
files = os.listdir()

# print(files[:10])
with open('../icon_map.txt', 'w') as out:
    for f in files:
#         if 'fill' in f: continue
        if 'fill' not in f: continue
        name = f[:-4]
        R_drawable = 'R.drawable.' + name
        code = name.split('_')[2]
        out.write(f'put("{code}", {R_drawable});\n')
